<?php

namespace app\admin\validate\shop;

use think\Validate;

class Task extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'platform_type'        => 'require',
        'shop_id'              => 'require',
        'goods_amin_pic'       => 'require',
        'pay_type'             => 'require',
        'goods_url'            => 'require',
        'goods_sno'            => 'require',
        'beat_price'           => 'require',
        'price_limit'          => 'require',
        'task_type'            => 'require',
        'browse_time'          => 'require',
        'is_good_evalute'      => 'require',
        'is_review`'           => 'require',
        'is_review_slide_show' => 'require',
        'is_need_send'         => 'require',
        'is_collect'           => 'require',
        'is_fake_check'        => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['platform_type', 'shop_id', 'goods_amin_pic', 'pay_type', 'goods_url', 'goods_sno', 'beat_price', 'task_type', 'browse_time', 'is_good_evalute', 'is_review', 'is_review_slide_show', 'is_need_send', 'is_collect', 'is_fake_check', 'other_requirement'],
        'edit' => [],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'platform_type'        => __('Platform_type'),
            'shop_id'              => __('店铺名称'),
            'goods_amin_pic'       => __('Goods_main_pic'),
            'pay_type'             => __('Pay_type'),
            'goods_url'            => __('Goods_url'),
            'goods_sno'            => __('Goods_sno'),
            'beat_price'           => __('Beat_price'),
            'task_type'            => __('Task_type'),
            'browse_time'          => __('Browse_time'),
            'is_good_evalute'      => __('Is_goods_evalute'),
            'is_review'            => __('Is_review'),
            'is_review_slide_show' => __('Is_review_slide_show'),
            'is_need_send'         => __('Is_need_send'),
            'is_collect'           => __('Is_collect'),
            'is_fake_check'        => __('Is_fake_check'),
            'other_requirement'    => __('Other_requirement'),
        ];
        parent::__construct($rules, $message, $field);
    }

}
